﻿using System;
using QueryBuilder.Core.Query.SqlTypes;

namespace QueryBuilder.Core.Query.Type
{
    /// <summary>
    /// 
    /// </summary>
    public class DateTimeType : PrimitiveType
    {
        /// <summary>
        /// 
        /// </summary>
        private static readonly DateTime BaseDateValue = DateTime.MinValue;

        /// <summary>
        /// Initializes a new instance of the <see cref="DateTimeType"/> class.
        /// </summary>
        public DateTimeType() : base(SqlTypeFactory.DateTime)
        {
        }

        /// <summary>
        /// Gets the default value.
        /// </summary>
        /// <value>The default value.</value>
        public override object DefaultValue
        {
            get { return BaseDateValue; }
        }

        /// <summary>
        /// Gets the name.
        /// </summary>
        /// <value>The name.</value>
        public override string Name
        {
            get { return "DateTime"; }
        }

        /// <summary>
        /// Gets the returned class.
        /// </summary>
        /// <value>The returned class.</value>
        public override System.Type ReturnedClass
        {
            get { return typeof (DateTime); }
        }
    }
}